<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery.js"></script>
</head>
<body>
<input name="btnSend" id="btnSend" value="Json读取数据" type="button">
<div id="request-process-patent"></div>

<script>

    $("#btnSend").click(function() {
        $("#request-process-patent").html("正在提交数据，请勿关闭当前窗口...");
        alert(GetJsonData());
        $.ajax({
            type: "GET",
            url: "http://127.0.0.1:8087/wap/getEarnings?userNoId=48390&type=4",
            contentType: "application/json; charset=utf-8",
            //data: JSON.stringify(GetJsonData()),
            //dataType: "json",
            success: function (data) {
                alert(data.msg);
                $.each(data.data, function (i, item) {
                    alert(item);
                });
            },
            error: function (message) {
                $("#request-process-patent").html("提交数据失败！");
            }
        });
    });

    function GetJsonData() {
        var json = {
            "userNoId": 48390,
            "type":4
        };
        return json;
    }

</script>

</body>
</html>